package io.gitee.zhangbinhub.admin.oauth.po

import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank

/**
 * @author zhangbin by 2018-1-17 16:53
 * @since JDK 11
 */
@Schema(description = "角色配置参数")
data class RolePo(

    @Schema(description = "角色ID，更新时必填")
    var id: String? = null,

    @Schema(description = "应用ID，更新时可不填", requiredMode = Schema.RequiredMode.REQUIRED)
    var appId: String? = null,

    @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "角色名称不能为空")
    var name: String? = null,

    @Schema(description = "角色编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "角色编码不能为空")
    var code: String? = null,

    @Schema(description = "角色级别", requiredMode = Schema.RequiredMode.REQUIRED)
    var levels: Int = 1,

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    var sort: Int = 0,

    @Schema(description = "类型")
    var type: Int? = null,

    @Schema(description = "关联用户ID")
    var userIds: MutableList<String> = mutableListOf(),

    @Schema(description = "关联菜单ID")
    var menuIds: MutableList<String> = mutableListOf(),

    @Schema(description = "关联模块功能ID")
    var moduleFuncIds: MutableList<String> = mutableListOf()

)
